package cn.com.bdqn.dao;

import cn.com.bdqn.entity.SysRoleRight;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SysRoleRightDao {

    @Delete("delete from sys_role_right where rf_role_id = #{value}")
    public int delSysRoleRight(Long rfRoleId);

    @Insert("insert into sys_role_right values\n" +
            "(default,#{rfRoleId},#{rfRightCode})")
    public int addSysRoleRight(SysRoleRight sysRoleRight);

    @Select("select * from sys_role_right where rf_role_id = #{value}")
    public List<SysRoleRight> queryByRfRoleId(Long rfRoleId);

}
